import {ListDetailPageStackPaginationStore} from "./ListDetailPageStackStore";
import {QueryProcurementReceiptResponse,ProcurementReceiptDetail} from "../apis/ProcurementReceiptApi";

const procurementReceiptPageStackStore = new ListDetailPageStackPaginationStore<QueryProcurementReceiptResponse, ProcurementReceiptDetail, number>(
    detail => ({
        id: detail.id,
        createdDateTime: detail.createdDateTime,
        lastModifiedDateTime: detail.createdDateTime,
        goodsKindAmount: detail.items.length,
        supplier: detail.supplier,
    }),
    item => item.id,
    detail => detail.id,
)

export default procurementReceiptPageStackStore